#if !defined(BIOTREE_H)
#define BIOTREE_H

#include <iostream>

using namespace std ;

template<class T>
int bisearch(T* arr,const T& x, int size)
{
	int max = size, min = 0;
	int mid = (max + min) / 2;
	while (1)
	{
		if (arr[mid] == x) return mid;
		else if (arr[mid] > x) max = mid - 1;
		else min = mid + 1;
		mid = (max + min) / 2;
	}
	return -1;
}

#endif // BIOTREE_H
